package com.example.demo.connerlt;


import java.util.concurrent.ThreadPoolExecutor;

@Configuration
@EnableAsync
public class myCon {
    private int corePoolSize=10;
    private int maxPoolSize=200;
    private int queueCapactiySize=10;
    @Bean
    public Exception taskExecutor(){
        ThreadPoolExecutor executor=new ThreadPoolExecutor();
        executor.setCorePoolSize(corePoolSize);
        executor.setMaximumPoolSize(maxPoolSize);
        executor.setQueueCapacity(queueCapactiySize);
        executor.initialize();
        return executor;
    }


}
